import { createRouter, createWebHistory } from 'vue-router'
import index from '../views/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/props',
      name: 'props',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/props/props.vue')
    },
    {
      path: '/eventTest',
      name: 'eventTest',
      component: () => import('../views/02_custom_event/eventTest.vue')
    },
    {
      path: '/eventBus',
      name: 'eventBus',
      component: () => import('../views/03_event_bus/evetnBusTest.vue')
    },
    {
      path: '/v_model',
      name: 'v_model',
      component: () => import('../views/04_v-model/modelTest.vue')
    },
    {
      path: '/attrsListenersTest',
      name: 'attrsListenersTest',
      component: () => import('../views/05_attrs-listeners/attrsListenersTest.vue')
    },
    {
      path: '/refChildrenPraent',
      name: 'refChildrenPraent',
      component: () => import('../views/06_ref-children-parent/refChildrenPraent.vue')
    },
    {
      path:'/provideInjectTest',
      name: 'provideInjectTest',
      component: () => import('../views/07_provide-inject/provideInjectTest.vue')
    },
    {
      path:'/pinia',
      name: 'pinia',
      component: () => import('../views/08_pinia/index.vue')
    },
    {
      path:'/slot',
      name: 'slot',
      component: () => import('../views/09_slot/slotTest.vue')
    },
  ]
})

export default router
